package com.dao;

import com.entity.Blog;
import com.util.PageUtil;
import org.junit.Test;

import java.util.List;


public class BlogDaoTest {

	@Test
	public void findByPage() {
		BlogDao blogDao = new BlogDaoImpl();

		PageUtil pageUtil = new PageUtil();
		pageUtil.setCurrentPage(10);

		List<Blog> list = blogDao.findByPage(pageUtil);
		for (Blog tmp : list){
			System.out.println(tmp.getId()+" "+tmp.getContent());
		}


		System.out.println(blogDao.findPageCount());
	}
}